package com.yideb.demo;

import com.yideb.cache.support.AnnotationCacheManager;
import org.springframework.cache.annotation.CachePut;
import org.springframework.cache.annotation.Cacheable;
import org.springframework.stereotype.Service;

import java.util.ArrayList;
import java.util.List;
import java.util.Optional;

@Service
public class DemoService {

    @Cacheable(cacheNames = "uuu", key = "#userId")
    public List<String> listUser(String userId) {
        AnnotationCacheManager annotationCacheManager=null;
        annotationCacheManager.getCache("uuu").get("ssss");
        List<String> list = new ArrayList<>();
        list.add("数学");
        list.add("语文");
        list.add("英文");
        System.out.println(list);
        return list;
    }

    public static void main(String[] args) {
        String s = "null";
        Optional.ofNullable(s).isPresent();
    }
}
